<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

    protected function _initView() {

        // Initialize view
        //$this->bootstrap('view');
        // $view = $this->getResource('view');

        $view = new Zend_View();
        $view->headTitle('fitness.pl - kontakt - twoje centrum sportu');
        $view->setEncoding('utf-8');
        $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8')
                ->appendHttpEquiv('Content-Language', 'pl-PL');
        $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
        $viewRenderer->setView($view);
        $view->jQuery()->setLocalPath($view->baseUrl() . '/scripts/jquery.js')
                ->addStylesheet($view->baseUrl() . '/css/style.css')
                ->addJavascriptFile($view->baseUrl() . '/scripts/contact.js')
                ->addJavascriptFile($view->baseUrl() . '/scripts/easySlider1.5.js')
                ->addJavascriptFile($view->baseUrl() . '/scripts/login.js')
                ->addJavascriptFile($view->baseUrl() . '/scripts/rejestracja.js')
                ->enable();

        return $view;
    }

    protected function _initModifiedFrontController() {
        $this->bootstrap('FrontController');
        $front = $this->getResource('FrontController');
        $response = new Zend_Controller_Response_Http;
        $response->setHeader('Content-Type', 'text/html; charset=UTF-8', true);
        $front->setResponse($response);
    }

    protected function _initMyActionHelpers() {

        $this->bootstrap('frontController');
        $login = Zend_Controller_Action_HelperBroker::getStaticHelper('Login');
        Zend_Controller_Action_HelperBroker::addHelper($login);
        
        $godzina = Zend_Controller_Action_HelperBroker::getStaticHelper('Godzina');
        Zend_Controller_Action_HelperBroker::addHelper($godzina);
        
        $dzien = Zend_Controller_Action_HelperBroker::getStaticHelper('Dzien');
        Zend_Controller_Action_HelperBroker::addHelper($dzien);
    }

}
